package com.simen.hellobytes.http;

import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;

public interface HttpBuilder {

    Map<String, String> getRequestHeaders();

    String getFileUrl();

    HttpBuilder setFileUrl(String fileUrl);

    HttpBuilder setConnectTimeout(int connectTimeout);

    int getConnectTimeout();

    HttpBuilder setReadTimeout(int readTimeout);

    int getReadTimeout();

    boolean acceptRange();

    long getContentLength();

    String getGuessFileName();

    String getContentDisposition();

    String getContentType();

    HttpBuilder setRequestHeaders(Map<String, String> requestHeaders);

    HttpBuilder addRequestHeader(String header,String value);

    HttpBuilder setHeadRange(long startPos);

    HttpBuilder setHeadRange(long startPos, long endPos);

    HttpBuilder setHeadRanges(long... pos);

    HttpBuilder download() throws IOException;

    HttpBuilder startHeadRequest() throws IOException;

    HttpBuilder setRequestBody(byte[] requestBody);

    boolean isRunning();

    HttpBuilder setRunning(boolean running);

    HttpBuilder closeImmediately();

    String getLocalFilePath();

    HttpBuilder setLocalFilePath(String localFilePath);

    boolean isTrustAllCert();

    HttpBuilder setTrustAllCert(boolean trustAllCert);

    String getProtocols();

    HttpBuilder setProtocols(String protocols);

    HttpDownloadProgressListener getProgressListener();

    HttpBuilder setProgressListener(HttpDownloadProgressListener progressListener);

    HttpBuilder setCacheFileBeforeComplete(boolean cacheFileBeforeComplete);

    boolean isCacheFileBeforeComplete();

    HttpBuilder setInstanceFollowRedirects(boolean instanceFollowRedirects);

    boolean isInstanceFollowRedirects();

    int getHttpCode();

    HttpBuilder setHttpDownloadListener(HttpDownloadListener httpDownloadListener);

    HttpDownloadListener getHttpDownloadListener();

    InputStream getErrorStream();

    String getStatusMsg();

    byte[] getResponse();

    byte[] getError();

    String stringResponse() throws IOException;

    HttpMethod getHttpMethod();

    HttpBuilder setHttpMethod(HttpMethod httpMethod);

    Map<String, List<String>> getResponseHeaders();

    byte[] getHeader50Byte();

    int getHeader50Length();

    HttpBuilder setOutputStreamCharset(String outputStreamCharset);

    String getOutputStreamCharset();

    HttpBuilder setHttpDownloadStreamListener(HttpStreamListener httpStreamListener);

    HttpStreamListener getHttpStreamListener();

    HttpBuilder setDisConnectFinally(boolean disConnectFinally);

    boolean isDisConnectFinally();

    String getSourceContentType();

    String getLocation();

    String getContentLocation();

    boolean isThisPrintLog();

    HttpBuilder setThisPrintLog(boolean thisPrintLog);
}
